<%@ page language="java"
         import="com.zhuozhengsoft.pageoffice.OpenModeType,com.zhuozhengsoft.pageoffice.PageOfficeCtrl"
         pageEncoding="utf-8" %>
<%
    PageOfficeCtrl poCtrl = new PageOfficeCtrl(request);
    //打开Word文档
    poCtrl.webOpen("doc/test.doc", OpenModeType.docNormalEdit, "张佚名");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>HtmlDialog</title>
    <script type="text/javascript">
        var count = 0;
        function updateCount(value) {
            count = count + value;
            document.getElementById("Text1").value = count;
            return count.toString();
        }
		
		function ShowModalDlg() {
			pageofficectrl.ShowHtmlModalDialog("Modal.html", "abcdefg", "left=300px;top=390px;width=560px;height=410px;");
		}
		function ShowModelessDlg() {
			pageofficectrl.ShowHtmlModelessDialog("Modeless.html", "123456", "left=300px;top=390px;width=560px;height=410px;");
		}
		function OnPageOfficeCtrlInit() {
			pageofficectrl.AddCustomToolButton("弹出模态窗口", "ShowModalDlg()", 0);
			pageofficectrl.AddCustomToolButton("弹出非模态窗口", "ShowModelessDlg()", 0);
		}
    </script>
</head>
<body>
<div>
	Count=<input id="Text1" type="text" value="0"/>
</div>
<div style=" width:auto; height:95vh;">
    <%=poCtrl.getHtmlCode()%>
</div>
</body>
</html>

